package com.zkh360.service.message.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zkh360.service.message.domain.SysResources;
import com.zkh360.service.message.model.SysResourcesVO;
import com.zkh360.service.message.model.SysUserVO;
import com.zkh360.service.message.mybatis.BaseMapper;

/**
 * Created by chuanxi.zhao on 18-1-19.
 */
@Mapper
public interface ResourcesMapper extends BaseMapper<SysResources> {

	/**
	 *
	 *
	 * @param authority
	 * @return
	 */
	public List<SysResourcesVO> loadResourcesByAuthority(String authority);

	/**
	 * 根据用户获取资源信息
	 * 
	 * @param sysUsers 用户属性
	 * @return 资源信息
	 */
	public List<SysResourcesVO> getResourcesByUser(@Param("user_id") Long user_id,
			@Param("user_account") String user_account,
			@Param("enabled") Integer enabled,
			@Param("startRow") Integer startRow,
			@Param("pageSize") Integer pageSize);
	
	/**
	 * 根据权限ID获取资源信息
	 * 
	 * @param authority_id 权限ID
	 * @return 资源信息
	 */
	public List<SysResourcesVO> getResourcesByAuthority(@Param("authority_id") Integer authority_id);

	public int getResourceCount(@Param("sysUsersVO") SysUserVO sysUsersVO);
}
